package com.example.test.mapper;


import com.example.test.entity.Log;
import com.example.test.entity.Look;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface LogMapper {
    @Select("SELECT * FROM logs")
    List<Log> getAllLogs();
    @Insert("INSERT INTO logs (date, text) VALUES ( #{date}, #{text})")
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    int insertLog(Log log);
}
